package com.huanxing.cloud.shop.api.feign;

import com.huanxing.cloud.common.core.constant.CacheConstants;
import com.huanxing.cloud.common.core.constant.SecurityConstants;
import com.huanxing.cloud.common.core.constant.ServiceNameConstants;
import com.huanxing.cloud.common.core.util.Result;
import com.huanxing.cloud.shop.api.vo.ShopInfoVO;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

@FeignClient(contextId = "remoteShopInfoService", value = ServiceNameConstants.SHOP_SERVICE)
public interface RemoteShopInfoService {

	/**
	 * 根据shopId获取店铺信息
	 * @param shopIds 店铺id
	 * @return 店铺列表
	 */
	@GetMapping("/app/shopinfo/list/{ids}")
	Result<List<ShopInfoVO>> getShopByIds(@PathVariable("ids") List<String> shopIds,
			@RequestHeader(SecurityConstants.SOURCE) String source);

}
